<?php
namespace Home\Controller;
use Common\Common\BaseController;

/**
 * Created by PhpStorm.
 * User: yanshaopeng
 * Date: 2018/9/9
 * Time: 21:30
 */
class ToolController extends BaseController{
    public function __construct()
    {
        parent::__construct();
    }
    public function index(){
        $this->display();
    }

    public function unixToBj(){
        $unix = I('post.unix_time',0);
        $r_data['time'] = date('Y-m-d H:i:s',$unix);
        $this->ajaxReturn($r_data,'json');
    }
    public function bjToUnix(){
        $unix = I('post.bj_time',0);
        $r_data['time'] = strtotime($unix);
        $this->ajaxReturn($r_data,'json');
    }
}